#include "G_u8g2Logo.h"
#include "Gscsd.h"
#include "G_u8g2.h"


void drawLogo(void)
{
    GU8g2_setFontModer(1);	// Transparent
#ifdef MINI_LOGO

     GU8g2_SetFontDirection(0);
    GU8g2_setFont(u8g2_font_inb16_mf);
    GU8g2_drawStr(0, 22, "U");
    
     GU8g2_SetFontDirection(1);
    GU8g2_setFont(u8g2_font_inb19_mn);
    GU8g2_drawStr(14,8,"8");
    
     GU8g2_SetFontDirection(0);
    GU8g2_setFont(u8g2_font_inb16_mf);
    GU8g2_drawStr(36,22,"g");
    GU8g2_drawStr(48,22,"\xb2");
    
    GU8g2_drawHLine(2, 25, 34);
    GU8g2_drawHLine(3, 26, 34);
    GU8g2_drawVLine(32, 22, 12);
    GU8g2_drawVLine(33, 23, 12);
#else

    GU8g2_SetFontDirection(0);
    GU8g2_setFont(u8g2_font_inb24_mf);
    GU8g2_drawStr(0, 30, "U");
    
     GU8g2_SetFontDirection(1);
    GU8g2_setFont(u8g2_font_inb30_mn);
    GU8g2_drawStr(21,8,"8");
        
    GU8g2_SetFontDirection(0);
    GU8g2_setFont(u8g2_font_inb24_mf);
    GU8g2_drawStr(51,30,"g");
    GU8g2_drawStr(67,30,"\xb2");
    
    GU8g2_drawHLine(2, 35, 47);
    GU8g2_drawHLine(3, 36, 47);
    GU8g2_drawVLine(45, 32, 12);
    GU8g2_drawVLine(46, 33, 12);
    
#endif
}

void drawURL(void)
{
#ifndef MINI_LOGO
  GU8g2_setFont(u8g2_font_4x6_tr);
  if ( GU8g2_getDisplayHeight() < 59 )
  {
    GU8g2_drawStr(89,20,"github.com");
    GU8g2_drawStr(73,29,"/olikraus/u8g2");
  }
  else
  {
    GU8g2_drawStr(1,54,"github.com/olikraus/u8g2");
  }
#endif
}

void u8geLogoTest(void){
  GU8g2_clearBuffer();
  drawLogo();
  drawURL();
  GU8g2_sendBuffer();
  delay_ms(1000);

}
